package com.visionork.android.twe.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class TWEActivity extends TabActivity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		initTab();
	}

	private void initTab() {
		TabHost tabHost = getTabHost(); 
		TabHost.TabSpec spec; 
		Intent intent; 

		intent = new Intent(this, VarietyShowsActivity.class);
		spec = tabHost.newTabSpec("shows").setIndicator("综艺节目")
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent(this, IdolDramasActivity.class);
		spec = tabHost.newTabSpec("dramas").setIndicator("偶像剧")
				.setContent(intent);
		tabHost.addTab(spec);
		
		intent = new Intent(this, WhatsNewActivity.class);
		spec = tabHost.newTabSpec("whatsnew").setIndicator("最新更新")
				.setContent(intent);
		tabHost.addTab(spec);
		
		tabHost.setCurrentTab(0);
	}
}